local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)

function showTimeLeft(p)
	doSendAnimatedText(p.pos, p.timeLeft, 199)
	return TRUE
end

function onCastSpell(cid, var)
	for t = 1, 19 do
		addEvent(showTimeLeft, t * 985, {cid = cid, timeLeft = 
(20-t), pos=var.pos})
	end
	return doCombat(cid, combat, var)
end
